define(['app'], function(app) {
	'use strict';

	// 实例化方法
	var factory = function(Http) {
		return{
			get_url: function(callack){
				Http.post({
					method:'marketing.seckill.checkOut',
					act_id:12,
					goods_id:5501,
					product_id:9057,
					num:1
				},function(result){
					if(callack)
					callack(result) ;
				})
			},
			get_data: function(callack){
				Http.post({
					method:'marketing.seckill.getDate',
					type:'spike',
				},function(result){
					if(callack)
					callack(result.result) ;
				})
			},
			create_pay:function(params,act_id,callback){
        		Http.post({
        			method:'marketing.seckill.creatOrder',
        			delivery:params.receiver,
        			shipping:params.shipping,
        			md5_cart_info:params.md5_cart_info,
        			type:'spike',
        			purchase:params.purchase,
        			extends_args:params.extends_args,
        			split_order:params.split_order,
        			act_id:act_id,
        			business_goods:params.business_goods
        		},function(result){
        			if(callback)
        			callback(result);
        		},function(e){
        			
        		},function(){
        			
        		})
        	},
        	get_goods:function(){
        		Http.post({
        			method:'goods.groupbuy.detail',
        			act_id:41,
        			goods_id:5521
        		},function(result){
        			
        		})
        	},
        	get_grouporder: function(callack){
				Http.post({
					method:'marketing.groupbuy.checkOut',
					act_id:41,
					goods_id:5521,
					product_id:9157,
					num:2
				},function(result){
					if(callack)
					callack(result) ;
				})
			},
			get_notice:function(callback){
				Http.post({
					method:'marketing.notice.getlist'
					
				})
			},
			get_newsend:function(callback){
				Http.post({
					method:'marketing.giving.detail',
					act_id:2
				})
			},
			upload:function(file,file_name,callback){
				Http.post({
					method:'marketing.giving.upload',
					file:file,
					file_name:file_name,
					order_id:'2017120411376413',
					act_type:'newtest'
				},function(data){
					if(callback)
					callback(data.result);
				})
			},
			download:function(callback){
				Http.post({
					method:'marketing.giving.down',
					file_id:60
				},function(result){
					if(callback)
					callback(result);
				})
			},
			get_live_data:function(params,callback){
				Http.post({
					method:'video.live.get',
					as_id:64,
					act_id:59
				},function(result){
					if(callback)
					callback(result);
				})
			}
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Stest", factory);
});